package com.example.spring.contrller;

import com.example.spring.bean.Dog;
import com.example.spring.bean.Person;
import com.example.spring.bean.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Indexcontrller {
    @Autowired
    private Person person;
    @Autowired
    private Student student;

//    @Autowired
//    Dog dog;

    @RequestMapping("person")
    public Object PersonInfo(){
        return person;
    }
    @RequestMapping("student")
    public Object StudentInfo(){

//        student.setDog(dog);
        return student;
    }

}
